package com.lzk.controller;

import com.lzk.domain.User;
import com.lzk.feignclients.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("pay")
public class PayController {

    //注入feign接口
    @Autowired
    private UserFeignClient userFeignClient;


    @RequestMapping("getById/{id}")
    public User getById(@PathVariable("id") Integer id){
        return userFeignClient.getById(id);
    }
}
